package com.duowan.realtime.scheduled.testpojo;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.LinkedList;
import java.util.List;

public class User {

    public User() {

    }

    public User(String name, Integer age) {
        this.name = name;
        this.age = age;
    }


    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }


    public static List<User> getUserList(int number) {
        List<User> result = new LinkedList<User>();
        for (int i = 0; i < number; i++) {
            result.add(new User("jack", i));
        }
        return result;
    }


}
